import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import './assets/css/global.css'
import './assets/css/common.scss' //通用样式
//引入svg组件在main.js里注册SvgIcon组件
import SvgIcon from '@/components/SvgIcon.vue'
import '@/assets/icons'
import * as ElIcons from '@element-plus/icons';
import resetForm from '@/utils/reset.js';
import VueParticles from 'vue-particles'

const app =createApp(App)
for(let  iconName in ElIcons){
    /*
     * 以elIcon为前缀的命名规则，是为了适配已经使用属性名添加图标的内置组件，
     * 例如：<el-button icon="el-icon-refresh"></el-button>
     */
    app.component(iconName, ElIcons[iconName]);
}

app.use(VueParticles);
app.use(store)
app.use(router)
app.use(ElementPlus,{locale:zhCn})
app.component('SvgIcon', SvgIcon)
app.config.globalProperties.$resetForm = resetForm
app.mount('#app')
